#!/usr/bin/env python
#encoding=utf8

def bisection(lst, t):
	if lst[0] > t or lst[-1] < t:
		return None

	size = len(lst)
	if lst[0] == t:
		return 0
	if lst[-1] == t:
		return size - 1

	offset = 0
	while True:
		size = len(lst)
		if size <= 2:
			return None
		mid = size // 2
		if lst[mid] == t:
			return mid + offset
		elif lst[mid] > t:
			lst = lst[:mid]
		else:
			offset += mid
			lst = lst[mid:]

def main():
	print(bisection(list(range(100)), 75))


if __name__ == '__main__':
	main()